import axios from '../axios'

/**
 *@des 用户信息相关接口
 *@param user-info.js
 */

// 获取用户信息
export const userInfo = data => {
  return axios({
    url: '/api/common/accounts/getManagerInfo',
    method: 'post',
    data
  })
}

// 退出登录
export const logout = data => {
  return axios({
    url: '/api/portal/loginforour/loginOut',
    method: 'post',
    data
  })
}

// 修改用户信息
export const saveUserInfo = data => {
  return axios({
    url: '/api/common/accounts/saveMyInfo',
    method: 'post',
    params:data
  })
}

// 上传文件
export const uploadAvatar = data => {
  return axios({
    url: 'https://upload.icve.com.cn',
    method: 'post',
    params: data
  })
}

// 修改用户头像
export const saveUserAvatar  = data => {
  return axios({
    url: '/api/common/accounts/saveAvatar',
    method: 'post',
    params:data
  })
}

// 修改用户密码
export const saveUserPwd = data => {
  return axios({
    url: '/api/common/accounts/editPassWord',
    method: 'post',
    params:data
  })
}
